home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- from checkbox.contrib.persist import Persist
- from checkbox.properties import Path
- from checkbox.plugin import Plugin
-
- class PersistInfo(Plugin):
- filename = Path(default = '%(checkbox_data)s/plugins.bpickle')
-
- def register(self, manager):
- super(PersistInfo, self).register(manager)
- self.persist = None
- for rt, rh in [
- ('gather', self.gather),
- ('stop', self.stop)]:
- self._manager.reactor.call_on(rt, rh)
-
-
-
- def gather(self):
- self.persist = Persist(self.filename)
- self._manager.reactor.fire('gather-persist', self.persist)
-
-
- def stop(self):
- '''Flush data to disk.'''
- if self.persist:
- self.persist.save()
-
-
-
- factory = PersistInfo
-